package com.suxin.plugin.loader;

import org.springframework.core.io.Resource;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Tang
 * @classname ResourceWrapper
 * @description [ 资源包装类 ]
 * @date 2022/7/21 22:31
 */
public class ResourceWrapper {

    private final List<Resource> resources;
    private final Map<String, Object> extensions = new HashMap<>();

    public ResourceWrapper(List<Resource> resources) {
        this.resources = resources;
    }

    public ResourceWrapper(Resource[] resources) {
        this.resources = Arrays.asList(resources);
    }

    public List<Resource> getResources() {
        return resources;
    }

    public Map<String, Object> getExtensions() {
        return extensions;
    }
}
